package org.dragonnova.iot.business.cloud.mq.service;

import javax.jms.ExceptionListener;
import javax.jms.JMSException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.google.common.base.Throwables;

@Service
public class JmsExceptionListener implements ExceptionListener {

	private final static Logger LOGGER = LoggerFactory
			.getLogger(JmsExceptionListener.class);
	@Override
	public void onException(JMSException exception) {
		LOGGER.error(Throwables.getStackTraceAsString(exception.getCause()));
	}

}
